import request from "@/utils/request";
// 询价单 获取列表
export function getAskList(data) {
    return request({
        url: "/heart/KingInquiry/ask/list",
        method: "post",
        data
    });
}
// 报价单 获取列表
export function getOfferList(data) {
    return request({
        url: "/heart/KingInquiry/offer/list",
        method: "post",
        data
    });
}
// 询价单 删除列表
export function deleteList(query) {
    return request({
        url: "/heart/KingInquiry/" + query,
        method: "delete",
    });
}
// 询价单 新增
export function addInquiryList(data) {
    return request({
        url: "/heart/KingInquiry",
        method: "post",
        data,
    });
}
// 采购申请单 获取列表
export function getPurchaseFrom(query) {
    return request({
        url: "/heart/PurchaseFrom/list",
        method: "get",
        params: query,
    });
}

// 查询金蝶-财务-出入库单
export function getKingInventoryList(query) {
    return request({
        url: "/heart/KingInventory/list",
        method: "post",
        data: query,
    });
}

// 采购订单 获取列表
export function getOrderList(data) {
    return request({
        url: "/heart/Order/list",
        method: "post",
        data,
    });
}
// 采购订单 新增
export function addList(data) {
    return request({
        url: "/heart/Order",
        method: "post",
        data,
    });
}
// 采购订单 修改
export function editList(data) {
    return request({
        url: "/heart/Order",
        method: "put",
        data,
    });
}

// 采购订单详情 获取列表
export function getOrderDetail(id) {
    return request({
        url: "/heart/Order/" + id,
        method: "get",
    });
}
//采购条款 获取列表
export function getOrderPurchaseTermsList() {
    return request({
        url: "/heart/OrderPurchaseTerms/list",
        method: "get",
    });
}
//物料信息 获取列表
export function getMaterialList() {
    return request({
        url: "/heart/Material/list",
        method: "get",
    });
}
//单据类型 获取列表
export function getDocTypeList(params) {
    return request({
        url: "/heart/KingDocType/queryTable",
        method: "get",
        params
    });
}
//根据采购合同查物料明细
export function getContractDetail(data) {
    return request({
        url: "/heart/ContractProcure/queryMaterial",
        method: "get",
        params: data,
    });
}

// 采购订单 删除列表
export function deleteOrderList(query) {
    return request({
        url: "/heart/Order/" + query,
        method: "delete",
    });
}
// 供应商 查询
export function getSupplierList(query) {
    return request({
        url: "/heart/Supplier/list",
        method: "get",
        params: query,
    });
}
// 供应商 删除
export function deleteSupplierList(query) {
    return request({
        url: "/heart/Supplier/" + query,
        method: "delete",
    });
}
// 供应商 详情
export function getDetailSupplierList(id) {
    return request({
        url: `/heart/Supplier/${id}`,
        method: "get",
    });
}
// 供应商 修改
export function editSupplierList(data) {
    return request({
        url: '/heart/Supplier',
        method: 'put',
        data
    })
}
//  采购合同选单获取物料接口
export function getContractMaterialLists(data) {
    return request({
        url: '/heart/Order/queryMaterial',
        method: 'get',
        data
    })
}
// 销售合同 选单获取物料接口
export function getSaleContractMaterialLists(data) {
    return request({
        url: '/heart/SaleOrder/queryMaterial',
        method: 'get',
        data
    })
}
